package org.codebase.cloud.eurekaclient;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

import java.util.Random;

/**
 * @author:xiaozhichao
 * @date:2018/9/19
 */
@RestController
public class ConcumerController {


    @RequestMapping("/hello")
    public String helloConsumer() {
        int sleepTime = new Random().nextInt(3000);
        try {
            Thread.sleep(sleepTime);
        } catch (InterruptedException e) {

        }
        return "helloWorld";
    }
}
